In a system receiving a stream of requests or tasks and assigning each of the tasks to a respective one of a plurality of resources, it may be advantageous to assign the tasks in such a manner that all of the resources carry substantially equal loads. One way to accomplish this is to calculate, for each task, the remainder, when a large, integer, random (or “pseudo-random”) number is divided by the number of resources, and to use the remainder as an index to identify the resource to be used. A remainder (or “modulo”) operation, however, may be one that is not readily implemented efficiently in digital hardware when the divisor (the number of resources) is not a power of 2. Moreover, it may be advantageous to use a long pseudo-random number (i.e., one represented using a relatively large number of bits) to reduce bias (or “polarization”), but the complexity of the digital logic may grow exponentially with the number of bits used to represent the pseudo-random number.
Thus, there is a need for an improved system and method for load balancing.